<template>
  <div class="cloze">
    <div
      v-for="(item, index) in JSON.parse(body.body).questionContent"
      :key="index"
      class="questionContent_arr"
    >
      <div v-html="item.html"></div>
    </div>
    <div
      class="m-question-item"
      v-for="(item, index) in JSON.parse(body.body).chooseanswer"
      :key="index"
    >
      <div style="margin-right:10px;">
        <!-- <span style="margin-right:10px;" class="color_red">{{item.answer}}</span> -->
        <span class="sort">{{ item.sort }}.</span>
      </div>
      <div
        v-for="(sitem, sindex) in item.choose"
        :key="sindex"
        class="choose"
        @click="choose(sitem, index)"
      >
        <span
          :class="[
            item.status === true ? 'choose-item choose-active' : 'choose-item'
          ]"
          >{{ sitem.name }}</span
        >
        <span class="f14">{{ sitem.content }}</span>
      </div>
    </div>
    <!--  
    <div v-if="analysis">{{JSON.parse(body.analysis).key}}</div>
    -->
  </div>
</template>

<script>
export default {
  props: {
    body: {
      default: function () {
        return {}
      }
    }
  },
  data () {
    return {}
  },
  created () {}
  // mounted() {
  //  this.init()
  // },
}
</script>

<style lang="scss">
.cloze {
  font-size: 14px;
  line-height: 28px;
  .questionContent_arr {
    img {
      padding: 10px 0;
    }
  }
  .m-question-item {
    display: flex;
    margin: 20px 0px;
    .sort {
      width: 20px;
      display: inline-block;
    }
    .choose {
      margin-right: 30px;
      margin-top: -5px;
      width: 220px;
      cursor: pointer;
      .choose-item {
        width: 22px;
        height: 22px;
        border: 2px solid rgba(51, 51, 51, 1);
        border-radius: 13px;
        text-align: center;
        line-height: 23px;
        color: #333;
        margin-right: 10px;
        display: inline-block;
        font-size: 14px;
      }
      .choose-active {
        width: 26px;
        height: 26px;
        line-height: 26px;
        border: none;
        background: #ffbe33;
        color: #333;
      }
    }
  }
}
</style>
